package leetcodecompetition.S118;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author: Siantar
 * @Date: 2023-11-25-22:31
 * @Description: 1.0
 */
public class T100121 {
    public List<Integer> findWordsContaining(String[] words, char x) {
        List<Integer> list = new ArrayList<>();
        for (int i = 0; i < words.length; i++) {
            if (isHas(words[i], x)) list.add(i);
        }
        return list;
    }

    public boolean isHas(String s, char x) {
        for (char c : s.toCharArray()) {
            if (x == c) return true;
        }
        return false;
    }
}
